﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TipCalc.Business;

namespace TipCalcWebApp
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Amount.Focus();
        }

        protected void CalculateButton_Click(object sender, EventArgs e)
        {
             
            //Calculate and display tip
            Bill bill = new Bill();
            
            bill.BillAmount = Convert.ToDecimal(AmountTextBox.Text);
            bill.TipPercentage = Convert.ToDecimal(TipPercentageTextBox.Text);
            TipAmountLabel.Text = bill.TipAmount.ToString();


        }
    }
}